home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
program
/
euphor14.zip
/
WHAT2DO.DOC
< prev
next >
Wrap
Text File
|
1996-05-20
|
4KB
|
90 lines
WHAT TO DO ?
------------
Now that you have read README.DOC and INSTALL.DOC, and you have installed
Euphoria, here are some things you can try:
* Run each of the demo programs in the demo directory. You just type ex
followed by the name of the .ex file to execute. e.g.
ex buzz
will run the file buzz.ex. (Depending on your graphics card you may have to
edit a line in some of the .ex files to select a different graphics mode.
Most demos will try to use SVGA modes. You need DOS mouse support to run
mouse.ex and ttt.ex).
You can also double-click on a .ex file from Windows. You will have
to "associate" .ex files with ex.exe. A few of the demos are meant
to be run from the command line, but most will look ok from Windows.
* Use the Euphoria editor, ed, to edit a .e or .ex file. Notice the
use of colors. You can adjust these colors along with the cursor size and
many other "user-modifiable" parameters by editing constant declarations
in ed.ex. Use Esc q to quit the editor or Esc h for help.
* Try the benchmarks in demo\bench. Do you get the same ratios as we did
in comparison with QBasic? If you have a C/C++ compiler, how much faster
can you get these benchmarks to run? We bet you'll be surprised,
especially when you consider that Euphoria runs the benchmarks with
subscript checking and a host of other run-time checks.
* Read the manual in doc\refman.doc. The simple expressive power of Euphoria
makes this manual much shorter than manuals for other languages. If you
have a specific question, type "guru" followed by a list of words. The
guru program will search all the .doc files as well as all the example
programs and other files, and will present you with a sorted list of the
most relevant chunks of text that might answer your enquiry.
* Try running a Euphoria program with tracing turned on. Add:
with trace
trace(1)
at the beginning of any .ex file.
* Try running a Euphoria program with profiling turned on. You need
to say "with profile" at the start of the file. The result will be
written to ex.pro. Language Wars (lw.ex) is interesting.
* Try the demo\learn.ex quiz. You may have trouble with this until you know
more about Euphoria.
* Try modifying some of the demo programs.
First some simple modifications (takes less than a minute):
What if there were 100 C++ ships in Language Wars? What if sb.ex had to
move 1000 tiny balls instead of 50 big ones? Change some parameters in
polygon.ex. Can you get prettier pictures to appear? Add some funny
phrases to buzz.ex.
Then, some slightly harder ones (takes a few minutes):
Define a new function of x and y in plot3d.ex.
Then some challenging ones (takes an hour or more):
Add your own customized new command to the editor. Set up your own
customized database by defining the fields in mydata.ex.
Then some major projects (several days or weeks):
Add SVGA graphics to Language Wars. Try to write a smarter 3D TicTacToe
algorithm. Design your own custom GUI library, either in text mode or
VGA graphics mode.
* Try writing your own program in Euphoria. A program can be as simple as:
? 2+2
Remember that after any error you can simply type "ed" to jump into
the editor at the offending file and line.
You can immediately run a program that you are editing, by typing
Esc e Enter in the editor. When the program is finished, hit Enter to
return to the editor.
Once you get used to it, you'll be developing programs much faster in
Euphoria than you could in BASIC, Fortran, Pascal, C/C++ or any other
language that we are aware of.